package com.example.practice2023.controller;

import com.example.practice2023.service.AdminService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

/**
 * ClassName: UserController
 * Package: com.example.practice2023.controller
 * Description:
 *
 * @Author hyx
 * @Create 2023/7/3 0:17
 * @Version 1.0
 */
@RestController
@RequestMapping("/admin")
//@Api(value = "用户数据test",tags = "用户数据接口API")
public class AdminController {
    @Resource
  private AdminService adminService;

    @RequestMapping(value = "/login",method = RequestMethod.POST)
    public Map<String,Object> selectByName(@RequestParam String adminName,@RequestParam String adminPass){
        return adminService.selectByUserName(adminName,adminPass);
    }
}
